package com.yunxiangyue

import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import com.yunxiangyue.app.R

class focus_fragement : Fragment(), View.OnClickListener {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
    }

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_focus_fragement, container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        view.findViewById<Button>(R.id.issue).setOnClickListener(this)
    }

    companion object {
        fun newInstance() = focus_fragement()
    }

    override fun onClick(p0: View?) {
        when(p0?.id){
            R.id.issue -> {
                val intent=Intent(activity,publish::class.java)
                startActivity(intent)
            }
        }
    }

}